﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StarTrek.Ship;

namespace StarTrek.Weapon
{
    class InvalidWeaponException:ApplicationException
    {
        private iWeapon source;
        private iShip target;

        public InvalidWeaponException(){}
        public InvalidWeaponException(iWeapon Used):this()
        {
            source = Used;    
        }
        public InvalidWeaponException(iWeapon Used, iShip Target):this(Used)
        {
            target = Target;
        }

        public override string Message
        {
            get
            {
                return string.Format("The weapon system,{0}, can not be applied to the target {1}.",source.GetType().Name, target.ShipName);
            }
        }
    }
}
